package com.huopaolan.yohuoshop.Mvp.Contract;

import com.huopaolan.lib_core.Mvp.Model.IModel;
import com.huopaolan.lib_core.Mvp.View.IView;
import com.huopaolan.yohuoshop.Bean.BaseEntity;
import com.huopaolan.yohuoshop.Bean.UserEntity;
import com.huopaolan.yohuoshop.Bean.UserMessageEntity;
import com.huopaolan.yohuoshop.Bean.UserRegisterEntity;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;

/***
 * 用户登录接口
 */
public interface UserContract {

    //登录接口
    interface LoginIView extends IView {
        void LoginSuccess(UserEntity entity);
    }

    interface LoginIModel extends IModel {
        Observable<UserEntity> login_user(String request);
    }

    //注册接口
    interface RegisterIView extends IView {
        void RegisterSuccess(UserRegisterEntity entity);
    }

    interface RegisterIModel extends IModel {
        Observable<UserRegisterEntity> register_user(String request);
    }

    //修改用户接口
    interface UserDetailsIView extends IView {
        void UserDetailsSuccess(BaseEntity entity);
        void SelUserDetailsSuccess(UserMessageEntity entity);
        void UploadUserSuccess(BaseEntity entity);
    }

    interface UserDetailsIModel extends IModel {
        Observable<BaseEntity> user_details(String request);
        Observable<UserMessageEntity> sel_user(String request);
        Observable<BaseEntity> upload_user(List<MultipartBody.Part> list);
    }
}
